#pragma once

class Message
{
public:
	static const int TYPE_TEXT = 0x01;
	static const int TYPE_FILE = 0x02;

	Message(void);
	~Message(void);

	int GetEncodedMessage(char* buffer, int offset, int length);
	int GetDecodedMessage(char* buffer, int offset, int length);
	int Encode(char type, char* buffer, int offset, int length);
	int Decode(char* buffer, int offset, int length);
private:
	char _type;
	int _length;
	char _message[10240];
};
